Hi there:
I'ts supposed we can add fonts from whatever the folder we want to FPDF.
For example, in the static/fonts folder that I've created for this purpose:
def numbers():
class MyFPDF(FPDF, HTMLMixin):
pass
pdf=MyFPDF()
pdf.add_page()
pdf.add_font('DejaVu', '', URL('static','fonts/DejaVuSans.ttf',
scheme=True, host=True), uni=True)
pdf.set_font('DejaVuSans','B',12)
pdf.cell(40,100,"Hello")
response.headers['Content-Type']='application/pdf'
return pdf.output(dest='S')
But I'm getting
<type 'exceptions.RuntimeError'> TTF Font file not found:
http://127.0.0.1:8083/myeducenter/static/fonts/DejaVuSans.ttf
And if I paste that URL in the browser I get the file...
Cheers
Pablo
--
---
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.