How to put the data on the picture and print it out?

currently has all the data for this table in order to print out such a table with data.
is there any way to implement it
it is known that it can be implemented with canvas, but it feels troublesome

The boss in the

answer has already said that you just need to use this as the background image, fill in the tag of div span, etc., and then use html2canvas to generate a picture, and then save this picture. The specific URL: html2canvas portal


.

html2canvas library can convert html elements directly to canvas

html2canvas(document.querySelector("-sharptable")).then(canvas => {
    //canvasbase64
});

html2canvas


you can take a look at the html2Canvas demo example

<body tabindex="1" class="loadingInProgress" id="contbox">
        <div class="btn" id="btn"></div>  
        <div><a id="down1" class="down" href="" download="downImg" ></a></div>
        <div></div>
</body>
**js:**
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>  
<script src="https://cdn.bootcss.com/html2canvas/0.4.1/html2canvas.js"></script>  
<script>
    //
    $(function(){  
    $("-sharpbtn").click(function(){  
        html2canvas($("-sharpcontbox"), {  
            height: $("-sharpcontbox").outerHeight() + 20,  
                width: $("-sharpcontbox").outerWidth() + 20  ,
                onrendered: function(canvas) {
                //canvas
                var timestamp = Date.parse(new Date());
                //a  
                $("-sharpdown1").attr('href',canvas.toDataURL());  
                //  
                $("-sharpdown1").attr('download',timestamp + '.png') ;   
                //document.body.appendChild(canvas);  
            }  
            // 
        });  
    });  
});  
</script>

window.print printing is easier

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eabd85-2088.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eabd85-2088.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?