Seems the threads are off on this posting.
http://docs.djangoproject.com/en/dev/howto/outputting-pdf/
I found pisa works well for converting html to pdf, however, I
resorted to using hideous code as the following:
inport ho.pisa as pisa
inpt = StringIO()
inpt.write(myHtml)
inpt.seek(0)
outpt = StringIO()
pdf = pisa.CreatePDF(inpt, outpt)
pdf = pisa.CreatePDF(src=inpt, dest=outpt)
if not pdf.err:
pdfout = outpt.getvalue()
outpt.close()
response.write(pdfout)
return response
else:
return None
Straight reportlab would the cleaner/optimal solution, I'm sure, but I
need to allocate more time for that effort.
The docs said that pisa could take a string as input, but that didn't
work for me, and there are some depreciated warnings with pisa as
well.
On Aug 14, 10:54 pm, "Sells, Fred" <[email protected]>
wrote:
> Does anyone have experience doing this and can share a link or a snippet.
>
> I've got a multi page PDF with editable fields, but I want to fill the whole
> thing in from my DB and then print it.
>
> Thanks.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.