I am using wkhtmltopdf to create PDF files, how ever I don't know how
to return them properly, docs says using a single dash instead of
output file name will write that to stdout. But I don't realize how to
return that content.

I have been trying using subprocess.Popen this way:

r = HttpResponse(Popen(command_args), mimetype='application/pdf')
r['Content-Disposition'] = 'filename=my_file_name.pdf'
return r

But I am not getting the result.

The only way I have managed to work is writting to file system in
media folder, and then redirect to the url based file, but this way
doesn't look good.

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to