I need your help in applying different font styles to both Paragraph and Chunk in a PDFCell. My code is as below:
BaseFont bf = BaseFont.createFont("c://windows//fonts//arial.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
Font font = new Font(bf, 16);
Font welcomeFont = new Font(Font.TIMES_ROMAN, 20,Font.UNDERLINE | Font.BOLD);
Chunk welcomeText = new Chunk("WelCome ", welcomeFont);
PdfPTable table = new PdfPTable(1);
PdfPCell cell =
new PdfPCell(new Paragraph("\u0625\u0644\u0649 \u0645\u0646 \u064a\u0647\u0645\u0647 \u0627\u0644\u0623\u0645\u0631"+welcomeText,
font));
table.setRunDirection(PdfWriter.RUN_DIRECTION_RTL);
table.getDefaultCell().setBorder(Rectangle.NO_BORDER);
cell.setBorder(Rectangle.NO_BORDER);
table.addCell(cell);
doc.add(table);
The above code is not applying the different font sizes and styles