Anil
unread,Aug 13, 2009, 10:42:14 AM8/13/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Pisa XHTML2PDF Support
I have a simple piece of code that works when I do this through
command line. (e.g. save to a test.py and then run it through cli).
pdf = pisa.CreatePDF(
html,
file(filename, "wb"))
However, when I do the same thing in Pylons web framework, a blank/
empty PDF file is generated:
def test(self):
import ho.pisa as pisa2
pisa2.showLogging()
filename = "file.pdf"
html = """
<center>
<font size="30">Testing</font>
</center>
"""
pdf = pisa2.CreatePDF(
html,
file(filename, "wb"))
if pdf.err:
return pdf.err
return "OK"
Any idea?