I am using iTextSharp to generate pdf. I have a table and need to add text in the table cell. I used Chunks & paragraph to add text in table. For new line I use n in chunks. But the line spacing between 2 lines is very narrow and I wan to increase the line spacing 2 lines. If give give n 2 times that will increase the size. How can I set line spacing? I tried SetLeading but it’s not working.
PdfPTable table = new PdfPTable(3);
Chunk pc1 = new Chunk(model.firstName +" "+model.lastName+" ("+gender+")"+ " / "+model.age +" Yn", AptosBold);
Chunk pc2 = new Chunk("Mobile : ", AptosBold);
Chunk pc3 = new Chunk(model.mobilephone+"n", Aptos);
Chunk pc4 = new Chunk("Weight : ", AptosBold);
Chunk pc5 = new Chunk(model.patient_weight + " kg ", Aptos);
Chunk pc6 = new Chunk("Height : ", AptosBold);
Chunk pc7 = new Chunk(model.height + " cm ", Aptos);
Chunk pc8 = new Chunk("BP : ", AptosBold);
Chunk pc9 = new Chunk(model.bp_low+" / "+model.bp_high +"n", Aptos);
Phrase p = new Phrase();
p.Add(pc1); p.Add(pc2); p.Add(pc3); p.Add(pc4); p.Add(pc5); p.Add(pc6); p.Add(pc7); p.Add(pc8); p.Add(pc9);
Paragraph paragraph = new Paragraph();
paragraph.SetLeading(0, 1.9f);
paragraph.Add(p);
PdfPCell cell = new PdfPCell(paragraph);
cell.Border = 0;
cell.HorizontalAlignment = Element.ALIGN_LEFT;
cell.Padding = 0;
cell.BorderColor = new Color(255, 255, 255);
table.AddCell(cell);