I have an HTML file that shows images correctly. However, the PDF generated from this HTML file does not show those images. What am I missing?
My Python code to generate PDF from HTML.
options = {
'page-size' : 'A4',
'dpi' : 400
}
css = ['../css/report.css', '../css/w3.css']
pdfkit.from_file(htmlFilePath, pdfFilePath, options=options, css=css)
The HTML file (used to generate PDF) has reference to image files as shown here:
<h2 class="heading">Trends of parameters and set-points</h2>
<h3>Trend-1</h3>
<div>
<img src="../png/PT-1.png"></img>
</div>
<h3>Trend-2</h3>
<div>
<img src="../png/PT-2.png"></img>
</div>
<h3>Trend-3</h3>
<div>
<img src="../png/PT-3.png"></img>
</div>