Hello I am generating a PDF in web2py but its ignoring my line breaks. randname = random.randrange(1, 10001) styles = getSampleStyleSheet() title = "My Title" doc = SimpleDocTemplate("primer.pdf") story = [] story.append(Paragraph(strftime("%a, %d %b %Y %H:%M:%S", gmtime()),styles["Heading2"])) para = ParagraphStyle(name="output", fontName='Helvetica', fontSize=12) story.append(Paragraph(str(result_list), para)) doc.build(story) response.headers['Content-Type']='application/pdf' response.headers['Content-Disposition'] = 'attachment;filename='+str(randname)+'-.pdf' return response.stream(open("primer.pdf", 'rb'))
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 [' '] *cheers
-- http://mail.python.org/mailman/listinfo/python-list