Django and Reportlab Question
- by Hellnar
Hello,
I have written this small Django view to return pdf.
@login_required
def code_view(request,myid):
try:
deal = Deal.objects.get(id=myid)
except:
raise Http404
header = deal.header
code = deal.code
response = HttpResponse(mimetype='application/pdf')
response['Content-Disposition'] = 'attachment; filename=code.pdf'
p = canvas.Canvas(response)
p.drawString(10, 800, header)
p.drawString(10, 700, code)
p.showPage()
p.save()
return response
And my questions:
Utf-8 characters are not shown correctly within the pdf.
How can I include an image ?
How can I include a very basic html such as:
.
<ul>
<li>List One</li>
<li>List Two</li>
<li>List Three</li>
</ul>