iTextSharp table width 100% of page

前端 未结 5 1735
小蘑菇
小蘑菇 2021-02-12 12:14

I\'m trying to add a table to a document using iTextSharp. Here is an example:

Document document = new Document(PageSize.LETTER,72, 72, 72, 72);
PdfWriter writer         


        
5条回答
  •  天命终不由人
    2021-02-12 13:09

    Figured it out. Apparently table.Width is a percent and not the width in pixels. So using:

    table.Width = 100;
    

    Worked like a charm.

提交回复
热议问题