我有这个代码:
var doc = new Document();
var pdf = "C:/pdfs/" + DateTime.Now.ToString("yyyymmdd") + ".pdf";
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(pdf, FileMode.Create));
doc.Open();
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();
doc.Close();
但是当我运行应用程序时,它没有显示在 PDF 上?我错过了什么?