Re: [web2py] going crazy with pyfpdf

2014-05-21 Thread Carlos Cesar Caballero Díaz
Thanks Mariano, I am working with your solution right now. El 21/05/14 14:25, Mariano Reingart escribió: It seems to be a web2py issue: generic view is sanitizing the html to much, so it is removing needed attributes (align, widht, etc.). A workaround to bypass generic html sanitization is cal

Re: [web2py] going crazy with pyfpdf

2014-05-21 Thread Mariano Reingart
It seems to be a web2py issue: generic view is sanitizing the html to much, so it is removing needed attributes (align, widht, etc.). A workaround to bypass generic html sanitization is calling pyfpdf directly: def pdf_test(): import os from gluon.contrib.fpdf import FPDF, HTMLMixin f

Re: [web2py] going crazy with pyfpdf

2014-05-21 Thread Cliff Kachinske
I've seen this. My leaky memory says pyfpdf doesn't like percentages. Try absolute units and I think it will work. On Wednesday, May 21, 2014 1:04:58 PM UTC-4, Carlos Cesar Caballero Díaz wrote: > > Thanks Mariano and Carlos, there is a simple code: > > controller default.py: > > def pdf_test

Re: [web2py] going crazy with pyfpdf

2014-05-21 Thread Carlos Cesar Caballero Díaz
Thanks Mariano and Carlos, there is a simple code: controller default.py: def pdf_test: return dict(hello="hello") view default/pdf_test.html: {{=hello}} This is a text name lastame

Re: [web2py] going crazy with pyfpdf

2014-05-21 Thread Mariano Reingart
Yes, pyfpdf has a basic html parser (based on python stdlib) and needs some conventions to translate tables to PDF. Could you make a minimal example to test and debug it? That way it would be easy to reproduce and see how to adapt the html to be rendered. You can look at the documented examples,

Re: [web2py] going crazy with pyfpdf

2014-05-21 Thread Carlos Costa
It uses pyfpdf to convert it. But there are some restrictions as I remember. You check it here https://code.google.com/p/pyfpdf/ 2014-05-21 12:13 GMT-03:00 Carlos Cesar Caballero Díaz < desarro...@spicm.cfg.sld.cu>: > Hi, I need some help, when I call a view with ".pdf" this: > > > >

[web2py] going crazy with pyfpdf

2014-05-21 Thread Carlos Cesar Caballero Díaz
Hi, I need some help, when I call a view with ".pdf" this: Report name pepe or this: name pepe returns a blank one page pdf. Now if I