Responsive Ad Area

Share This Post

test

Creating and displaying data in iText 7 for .NET Table

Creating and displaying data in iText 7 for .NET Table

It should be simple enough:

    public void WritePartsPdf(Document doc)
    {
        Table table = new Table(2, true);

        foreach (var part in PartsList)
        {
            Paragraph name = new Paragraph(part.PartName);
            Paragraph length = new Paragraph(part.Length.ToString());

            var cell = new Cell().Add(name);
            var cell2 = new Cell().Add(length);
            cell.Add(cell2);

            table.AddCell(cell);
        }
        doc.Add(table);
    }

However my paragraphs are duplicated across all cells, I need the obvious here being one column for name and the other one for length.

enter image description here

Help please!


Creating and displaying data in iText 7 for .NET Table
Creating and displaying data in iText 7 for .NET Table
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>