pydf
pydf copied to clipboard
Why it doesn't load images in PDF?
In the rendered PDF images are not loaded.
here is main.py
import pydf
html_str = """
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>بن اعتباری</title>
</head>
<body>
<img src="./pizza.jpg" />
</body>
</html>
"""
pdf = pydf.generate_pdf(html_str)
with open("test_doc.pdf", "wb") as f:
f.write(pdf)
and image exists in that directory and everything is fine in html file
@MojixCoder I think this will probably answer your question! https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4723