1

How do i reduce line space in itextsharp.
I am using chunk to add a paragraph in itextsharp
Though my code working fine ,but i want to reduce the gap between two lines.

Here is My code

     BaseFont bfTimes = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, false);               
     iTextSharp.text.Font fontH5 = new iTextSharp.text.Font(bfTimes, 8);

          Chunk c3 = new Chunk("xyz", fontH5 );
          Chunk c4 = new Chunk("xyz11", fontH5 );                        


          Phrase p2 = new Phrase();
          p2.Add(c3);                      

          Paragraph p = new Paragraph();
          p.Add(p2);
          pdfDoc.Add(p);
          pdfDoc.Close();
Developer
  • 89
  • 1
  • 14

1 Answers1

0

Just adding a Leading..

     BaseFont bfTimes = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, false);               
     iTextSharp.text.Font fontH5 = new iTextSharp.text.Font(bfTimes, 8);

          Chunk c3 = new Chunk("xyz", fontH5 );
          Chunk c4 = new Chunk("xyz11", fontH5 );                        


          Phrase p2 = new Phrase();
          p2.Add(c3);                      

          Paragraph p = new Paragraph();
          p.Leading = 12;
          p.Add(p2);
          pdfDoc.Add(p);
          pdfDoc.Close();

My code works fine..

Developer
  • 89
  • 1
  • 14