I am using weasyprint it working on window perfectly and also it is working on linux
when I used this string in html file like
weasyprint my.html my.pdf
It perfectly show image but when I do the below code so the image not showing I
html_string = '<img src="http://domain_name/static/assets/images/logo/logo.png" alt = "Logo" /> <h1>images</h1>' # Create a PDF object from the HTML string
#pdf = weasyprint.HTML(string= html_string, base_url=request.build_absolute_uri()).write_pdf(presentational_hints = True, stylesheets=[weasyprint.CSS(string='@page { size: letter; }')])
# # Create an HTTP response with the PDF content
response = HttpResponse(content_type='application/pdf')
response['Content-Disposition'] = 'attachment; filename="marksheet.pdf"'
response.write(pdf)
return response
I used absolute_url but not showing images nothing get any idea why it not showing image