Here is my code
options = {
"enable-local-file-access": True,
...
}
pdfkit.from_string(html_file, pdf_file, options=options, ...)
since Im using Django template, here is my code to reference that
<img src="{{ static_root }}{% static '../../target.svg' %}" alt="">
I use a local image file in html, It just shows a blank box in pdf output file
I also tried using "base64" to resolve my issue base on this link pdfkit not converting image to pdf
It doesn't really work to me.
realized pdfkit doesn't like .svg, I use .png format instead