Ok, i find a  way to work with the template and it works well:

I use this code in web2py:

def print_task():
      task = db.task(request.args(0,cast=int))
      from gluon.contrib.markmin.markmin2pdf import latex2pdf
      template = 
open('//home/user/web2py/applications/Tagesaufgaben/tex/tex/templatee.tex','r').read()
 
# check path
      latex = template.format(status=task.status) # args of the dbase
      pdf, warning, errors = latex2pdf(latex)
      if errors: pass # log errors
      response.headers['Content-Type'] = 'application/pdf'
      return pdf

And this code in the template.tex

 \documentclass{{article}} 

\begin{{document}}

{status}

\end{{document}}


thanks for help Massimo


>>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to