0
我发现此代码将文本放置在页面上的特定位置。ItextSharp:在页面中循环定位文本
ColumnText ct = new ColumnText(cb);
Phrase myText = new Phrase("TEST paragraph\nNewline");
ct.SetSimpleColumn(myText, 34, 750, 580, 317, 15, Element.ALIGN_LEFT);
ct.Go();
现在我想在forlooop这样做一系列文本。我有
columnText ct = new ColumnText(cb)
Phrase myText; int x = 34; int y = 750;
for(int i = 0; i<5; i++){
myText = new Phrase("TEST paragraph\nNewline");
ct.SetSimpleColumn(myText, x, y, 580, 317, 15, Element.ALIGN_LEFT);
ct.Go();
x += 10;
y+= 12;
}
但是,这给了我一个错误,因为文档无法创建。
我该怎么做?