iTextSharpを使用してドキュメントにテーブルを追加しようとしています。次に例を示します。
Document document = new Document(PageSize.LETTER,72, 72, 72, 72);
PdfWriter writer = PdfWriter.GetInstance(document, new FileStream("C:\\test.pdf", FileMode.Create));
document.Open();
Table table = new Table ( 2, 1 );
table.Width = document.RightMargin - document.LeftMargin;
// Cell placeholder
Cell cell = new Cell ( new Paragraph ( "Some Text" ) );
table.AddCell ( cell );
cell = new Cell ( new Paragraph ( "More Text" ) );
table.AddCell ( cell );
document.Add ( table );
document.Close ( );
ページの余白が広がるようにテーブルの幅を設定しています。しかし、PDFが作成されると、テーブルはマージン間のスペースの約80%しか占有しません。私はここで何か間違ったことをしていますか?