Skip to content

Can not convert a html with <b></b> to bold font in the pdf #231

Description

@tszzzyeung
<td class="flttblbodyB" colspan="3" style="padding-top:3px;"><font class="flt_date"> 02 Jul</font> - Please verify flight times prior to departure</td>&#13;
<td class="flttblhdrB" style="padding-top:3px;"><b>AIRLINE RES CODE</b> : </td>&#13;

Amendment :

builder.useFont(new File(System.getenv("SystemRoot")+"/fonts/" + "arialuni.ttf"), "Arial Unicode MS", 400, PdfRendererBuilder.FontStyle.NORMAL, true);

builder.useFont(new File(System.getenv("SystemRoot")+"/fonts/" + "arialuni.ttf"), "Arial Unicode MS", 700, PdfRendererBuilder.FontStyle.NORMAL, true);
builder.useFont(new File(System.getenv("SystemRoot")+"/fonts/" + "cour.ttf"), "Courier New", 400, PdfRendererBuilder.FontStyle.NORMAL, true);
builder.useFont(new File(System.getenv("SystemRoot")+"/fonts/" + "courbd.ttf"), "Courier New", 700, PdfRendererBuilder.FontStyle.NORMAL, true);

originally , my program added above lines , however i cannot get a desired result, but after i remove above lines , the pdf can display the normal style and bold style correctly, but my desired font is not set since i remove the above line. So my problem is, is there any way to set the font that i want and have a correct display of bold style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions