html2pdf.js icon indicating copy to clipboard operation
html2pdf.js copied to clipboard

html2pdf rendered all text as image

Open depizzol opened this issue 2 years ago • 4 comments

I am using the html2pdf to create a PDF from a html element. The PDF is being generated, but all texts are being rendered as image. Can someone please support me?

Code is below:

[reportissue.zip](https://github.com/eKoopmans/html2pdf.js/files/12178314/reportissue.zip)
<title>QualityLab</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<div id="div_Report" class="div_RightFrame" style="width:500px;">

    <input type="button" value="Generate PDF" onclick="Convert_HTML2PDF()">


    <div id="test">

        <!-- REPORT SUMMARY -->
        <div id="div_Report_Summary" style="width:90%; ">

            <h2>1. SUMMARY</h2>

            <table style="width:80%; font-size:10px;">
                <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>
                <tr>
                    <td>John</td>
                    <td>Doe</td>
                    <td>80</td>
                </tr>
            </table>

        </div>
    </div>
</div>

depizzol avatar Jul 27 '23 00:07 depizzol

because it creates an image from html and converts it to pdf

vitaliy-pak avatar Jul 30 '23 05:07 vitaliy-pak

because it creates an image from html and converts it to pdf

Thanks Vitaliy... Is there a way to convert the HTML to PDF in text?

depizzol avatar Jul 31 '23 12:07 depizzol

yes you can use jspdf or makepdf or mostly react-pdf

princetechs avatar Nov 04 '23 22:11 princetechs