Firstname Lastname Age" /> Firstname Lastname Age" /> Firstname Lastname Age"/>

Show text multi byte in pdf in java itext?

126 Views Asked by At

I have file html :

<p>Hello everyone</p>
<p>ユーザロールを持つユーザだけが利用できるコンテンツ</p>
<table style="width:100%">
    <tr>
        <th>Firstname</th>
        <th>Lastname</th> 
        <th>Age</th>
    </tr>
    <tr>
        <td>Jill</td>
        <td>Smith</td> 
        <td>50</td>
    </tr>
    <tr>
        <td>Eve</td>
        <td>Jackson</td> 
        <td>94</td>
    </tr>
</table>

I using itext to convert to pdf but I can't convert text "ユーザロールを持つユーザだけが利用できるコンテンツ" This is code java :

Document document = new Document();

    PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("html.pdf"));
    document.open();
    XMLWorkerHelper.getInstance().parseXHtml(writer, document, new FileInputStream(filename), Charset.forName("UTF-8"));
    document.close();

I using itext, xmlworker version : 5.5.3

0

There are 0 best solutions below