I followed your advised Massimo. It installed well. I already figured the 
dimensions of the images conflict.

The 320x479 uploaded file works well. But if the users uploaded 1600x1200 
or more, it makes the same error.

Am I missing something?

On Tuesday, July 16, 2013 1:13:53 PM UTC+3, Massimo Di Pierro wrote:
>
> You need to
>
>    pip install PIL
>
> or
>
>    sudo apt-get install python-imaging
>
> or on mac
>
>    brew brew install pil
>
> On Tuesday, 16 July 2013 00:52:15 UTC-5, Tribo Eila wrote:
>>
>> Mariano,
>>
>> I already took your advised. But I can't figure out this error: 
>>
>> RuntimeError: FPDF error: PIL not installed
>>
>> After I installed the latest Binary Installer of PIL to 
>> python/../site-package. Still error exist.
>> Copy the folder to web2py/../site-packages, still the same.
>>
>> I tried to import PIL in python command line. No error.
>>
>> Any advised?
>>
>> Regards,
>>
>> Eila
>>
>>
>> On Monday, July 15, 2013 6:49:00 PM UTC+3, Mariano Reingart wrote:
>>>
>>> You shoud have the picture in a file, so PyFPDF can load it. 
>>>
>>> Take a look at  build_badge_dict in web2conf: 
>>>
>>> https://code.google.com/p/web2conf/source/browse/controllers/badge.py#103 
>>>
>>> It uses some icons (speaker, country flag) from the private directory, 
>>> and uses the sponsor logo from a upload field in the database. 
>>>
>>> Basically, you should pass the full image path to PyFPDF (sponsor.logo 
>>> is the upload field): 
>>>
>>> fn = db.sponsor[user.sponsor_id].logo 
>>> source = os.path.join(request.folder, 'uploads', fn) 
>>>
>>> See the sample function, that uses that info to generate the pdf. 
>>>
>>> Best regads 
>>>
>>> Mariano Reingart 
>>> http://www.sistemasagiles.com.ar 
>>> http://reingart.blogspot.com 
>>>
>>>
>>> On Mon, Jul 15, 2013 at 2:03 AM, Tribo Eila <[email protected]> 
>>> wrote: 
>>> > Hi, 
>>> > 
>>> > Supposed the code below: 
>>> > 
>>> > db.define_table('person', 
>>> >                 Field('name'), 
>>> >                 Field('picture', 'upload')). 
>>> > 
>>> > I'm trying to figured out, how to implement the picture to retrieve 
>>> from 
>>> > database(postgreSQL) to FPDF. 
>>> > 
>>> > Any ideas to share? 
>>> > 
>>> > Thanks. 
>>> > 
>>> > Newbie 
>>> > 
>>> > 
>>> > 
>>> > 
>>> > -- 
>>> > 
>>> > --- 
>>> > 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 [email protected]. 
>>> > For more options, visit https://groups.google.com/groups/opt_out. 
>>> > 
>>> > 
>>>
>>

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to