Hello I am generating a PDF in web2py but its ignoring my line breaks.<br><br> randname = random.randrange(1, 10001)<br> styles = getSampleStyleSheet()<br> title = "My Title"<br> doc = SimpleDocTemplate("primer.pdf")<br>
story = []<br> story.append(Paragraph(strftime("%a, %d %b %Y %H:%M:%S", gmtime()),styles["Heading2"]))<br> para = ParagraphStyle(name="output", fontName='Helvetica', fontSize=12) <br>
story.append(Paragraph(str(result_list), para))<br> doc.build(story)<br> response.headers['Content-Type']='application/pdf'<br> response.headers['Content-Disposition'] = 'attachment;filename='+str(randname)+'-.pdf'<br>
return response.stream(open("primer.pdf", 'rb'))<br><br><br>result_list is a generated list. The pdf ignores line breaks and outputs it as a list so [' '] are included also. Any idea how I can create line breaks and get rid of the [' ']<br>
<br>*cheers<br>