Latex+django problem was solved

I was solved the problem of latex + django. Now able to create the pdf using latex in django.

How i solve this, Just using

Function here is code:-

import os
from django.template.loader import render_to_string
from subprocess import call
def home(request):
texfile ='/home/sofat/latex/tamplate/my_latex_tamplate.tex', os.O_RDWR)
texfilename = "/home/sofat/latex/tamplate/my_latex_tamplate.tex"
os.write(texfile, render_to_string('my_latex_tamplate.tex', {'content':'sofa'}))
call(['pdflatex', texfilename])

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s