[reportlab-users] converting entire text file

r2b2 reportlab-users@reportlab.com
Fri, 27 Aug 2004 21:44:06 -0400 (EDT)


How can i convert an entire text file to pdf? 
when i run my programs only 1 line of the text file i'm trying to convert to pdf is brought over. my text file is probably 20 lines or more yet when i run the program only one line is brought over and converted to pdf.

from reportlab.pdfgen import canvas

x = open("c:\compda37","r")
whole_thing = x.read()
x.close()
def hello(c):
    c.drawString(-160,825, whole_thing )
c = canvas.Canvas("comppdf.pdf")
hello(c)
c.showPage()
c.save







_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way your home on the Web - http://www.myway.com