I am using itextsharp to dynamically write on the pdf. I am creating a table in the pdf document which contains the values from the database. Can someone please tell how to modify the font-size of the values in the table.
Try this:
Font fontH1 = new Font(Currier, 16, Font.NORMAL);
PdfPTable table = new PdfPTable(1);
table.AddCell(new PdfPCell(new Phrase(yourDatabaseValue,fontH1)));
Please try by setting font to the PdfPTable.DefaultCell property
Example:
pdfTable.DefaultCell.Phrase = new Phrase() { Font = fontNormal };
I have already answer this before : Set font for all text from Pdfptable with Itextsharp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With