I am currently utilizing the HTML-pdf library to convert an HTML page into a PDF format. While the dynamic content is being displayed in the generated PDF, there seems to be an issue with the image not appearing as expected. Despite trying various methods, I have been unsuccessful in rendering the image in the final PDF file. Can someone assist me with troubleshooting this problem? Below is the snippet of my HTML template:
<head>
<title>Certificate</title>
<!-- <link rel="stylesheet" href="../stuff/certificate.css"> -->
<style>
html,
body {
height: 100%;
width: 100%;
}
img{
height: 100%;
width: 100%;
margin:0px;
}
#name{
margin-top:-420px;
margin-left: 60px;
}
p{
font-size:40px;
color:black;
font-weight:400;
text-align: center;
}
</style>
</head>
<body>
<img src="../stuff/certificate.jpg">
<div id="name"><p><%=name%></p></div>
</body>
</html>
While I am successfully able to display the name on the PDF, the image remains missing. Any suggestions or guidance would be greatly appreciated. The image is located in a different folder compared to the HTML file.