是否可以使用iTextSharp
將邊框添加到PDF文檔中的頁面?我從頭開始生成PDF文件,因此我不需要爲現有文檔添加邊框。如何使用iTextSharp爲頁面添加邊框?
這裏是我的示例代碼:
Document pdfDocument = new Document(PageSize.LETTER);
Font headerFont = new Font(baseFont, 13);
Font font = new Font(baseFont, 10);
PdfWriter writer = PdfWriter.GetInstance(pdfDocument,
new FileStream(fileName, FileMode.Create));
pdfDocument.Open();
//I add IElements here.
pdfDocument.Close();
我相信你可以的。你的意思是問怎麼做? – Oded 2011-06-13 20:11:20
當然[chars]。 – 2011-06-13 20:38:04
我不確定您是否可以直接向文檔添加邊框。但是,您應該可以使用表或PDFTable來實現相同的結果。 – 2011-06-13 20:51:19