2017-08-03 34 views

回答

0
  1. 您可以在一個單元格表中的文本,並設置邊框上表
  2. 可以繪製在窗體X對象的文字,畫出任何一種圖形中的文本,然後插入流文檔中的表單XObject。
+0

謝謝米海。我選擇了#1選項。這是我的代碼: – ata6502

+0

var table = new PdfFlowTableContent(1); table.OuterMargins = new PdfFlowContentMargins(0,0,6,0); table.Border = new PdfPen(PdfRgbColor.Black,0.5); PdfFlowTableRow row = table.Rows.Add(); var cell = new PdfFlowTableStringCell(text){InnerMargins = cellPadding,Font = fontText,Multiline = true}; row.Cells.Add(cell); document.AddContent(table); – ata6502

+0

儘管選項#1存在問題。文字非常密集,因爲它沒有LineSpacing。包括段落而不是純文本可以做到這一點,但我不知道如何在PdfFlowTableContent中包含段落。 – ata6502