Sure. I had tried to render PDF with pisa,
template = get_template(template_src) context = Context(context_dict) html = template.render(context) result = StringIO.StringIO() pdf = pisa.pisaDocument(StringIO.StringIO(html.encode("ISO-8859-1")), result, link_callback=fetch_resources) if not pdf.err: return HttpResponse(result.getvalue(), mimetype='application/pdf') return HttpResponse('Errors<pre>%s</pre>' % escape(html)) Also tried with wkhtmltopdf - from wkhtmltopdf.views import PDFTemplateResponse ...... return PDFTemplateResponse(request, 'pdf/pdftemplate.html', { 'pagesize':'A4', 'user': results['user'], 'question': results['question_obj'], }) In both cases it doesn't render the elements which I am populating with help of onload javascript function. On Wednesday, February 13, 2013 10:45:40 PM UTC-5, ovnicraft wrote: > > > > > On Sun, Feb 10, 2013 at 11:10 AM, Jaimin Patel > <jaimi...@gmail.com<javascript:> > > wrote: > >> I am trying to generate pdf using django template, also need some support >> of javascript code. I have tried PISA, ReportLib and wkhtmltopdf but it >> seems that it doesn't wait for Javascript. > > > Hello, can you explain us better what you means with *does not wait for > JS* ? > I understand you say: pdf is rendered w/o running JS code. > > Regards, > >> >> Can someone suggest good solution or example? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users...@googlegroups.com <javascript:>. >> To post to this group, send email to django...@googlegroups.com<javascript:> >> . >> Visit this group at http://groups.google.com/group/django-users?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Cristian Salamea > @ovnicraft > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.