I am creating pdf from my html page using pisa in django framework. Can anyone please tell me how to adjust the pdf page size. I tried to use A5 but its not reflecting. Please find the code below:
context_dict = {
'pagesize':'A5',
'result_detail': obj.result_object(slug, roll_no),
'roll_no': roll_no
}
template = get_template('widgets/result.html')
context = Context(context_dict)
html = template.render(context)
result = StringIO.StringIO()
pdf = pisa.pisaDocument(StringIO.StringIO(html.encode("ISO-8859-1")), result)