Problem Creating NewLines in PDF

MRAB python at
Wed Aug 18 21:28:38 CEST 2010

Andrew Evans wrote:
> Hello ty for the fast replies
> This is the string I am using for the PDF I was able to create new lines 
> using the HTML  "br" tag which is what I wanted a method to create new lines
> search_str="Position: (%d) - Keyword: (%s) - Domain (%s) <br /><br />" % 
> (idx+1, target_keyword, session.target_domain)
>                     result_list.append(search_str)
>  however it maintains these characters in the text of the generated PDF
> ['
> ', '
>  '] with the string in between those
> I just want to be able to out put the string with no extra characters I 
> assume these characters are there because its a list
As I said, if you just want to join a list of strings into one string,
then use "".join(result_list):

story.append(Paragraph("".join(result_list), para))

More information about the Python-list mailing list