Yesterday I've just figured out that OpenERP's default report engine is still unable to create PDF reports with full unicode character support. Only the characters present in the Latin1 encoding are allowed.
This is all because the PDFs are genereated with the old standard Type1 fonts that have only Latin1 characters. The solution is to use TrueType fonts that have proper unicode support.
After browsing the forums and the net for some time I created a blueprint and a wikipage with a possible solution.
bug: https://bugs.launchpad.net/bugs/319595
Subscribe to:
Post Comments (Atom)
Hi Dukai thank you. I have tried your fix for the unicode report however I got this problem when start the server.
ReplyDelete[2009-02-27 17:43:33,441] INFO:objects:initialising distributed objects services
Traceback (most recent call last):
File "./openerp-server.py", line 93, in module>
import report
File "/usr/lib/python2.5/site-packages/openerp-server/report/__init__.py", line 23, in module>
import interface
File "/usr/lib/python2.5/site-packages/openerp-server/report/interface.py", line 36, in module>
import render
File "/usr/lib/python2.5/site-packages/openerp-server/report/render/__init__.py", line 24, in module>
from rml import rml, rml2html
File "/usr/lib/python2.5/site-packages/openerp-server/report/render/rml.py", line 24, in module>
import rml2pdf
File "/usr/lib/python2.5/site-packages/openerp-server/report/render/rml2pdf/__init__.py", line 53
'DejaVuSans', 'DejaVuSans.ttf',enc))
^
SyntaxError: invalid syntax
I use openerp 5.0.0.3 Could you please give me some advice on how to fix this. Thank you.
It should be like pdfmetrics.registerFont(TTFont('DejaVuSans', 'DejaVuSans.ttf',enc))
ReplyDeletein one line not just
'DejaVuSans', 'DejaVuSans.ttf',enc))
Thank you Dukai. It works like a charm now. May be you could add the missing pdfmetrics.registerFont(TTFont( into the wiki page. I could't see them, or maybe that's just my case :D. Thank you very much.
ReplyDeleteThanx for this fix!
ReplyDeleteWe were trying to print reports in ukrainian without success.