How to insert tab using itextsharp?

10,016

Unluckily, iTextSharp does not support Tab, but you can use Paragraph Paragraph.IndentationLeft instead.

You also can use cell.PaddingLeft for table cell.

Share:
10,016
Bat_Programmer
Author by

Bat_Programmer

Updated on June 04, 2022

Comments

  • Bat_Programmer
    Bat_Programmer almost 2 years

    I'm using iTextSharp to generate pdfs in my .net application.
    I'm stuck at a small yet very simple place that I can't seem to figure out.

    I'm generating table using PdfPTable and adding cells to them.

    In one of these cells I want add say about 3 tabs in it.
    I have tried following 2 code but not giving me desired output.

    table.AddCell(new Phrase("\t\tDate:", sampleFont)); //Date:
    
    table.AddCell(Chunk.TAB + Chunk.TAB + new Phrase("Date:", sampleFont)); //TABTABDate:
    
  • Bat_Programmer
    Bat_Programmer over 11 years
    How can I integrate this im the table cell?
  • cuongle
    cuongle over 11 years
    @ConfusedProgrammer: you cannot add Paragraph into table cell?