如何在PdfPTable中更改字体大小?

Aad*_*ada 8 c# asp.net itextsharp

我正在使用itextsharp动态写入pdf.我在pdf文档中创建一个表,其中包含数据库中的值.有人可以告诉如何修改表中值的字体大小.

Pab*_*aus 18

试试这个:

Font fontH1 = new Font(Currier, 16, Font.NORMAL);

PdfPTable table = new PdfPTable(1);

table.AddCell(new PdfPCell(new Phrase(yourDatabaseValue,fontH1)));
Run Code Online (Sandbox Code Playgroud)