I created a report in odoo 8 using RML, everything is good. but when i print the report, caracteres are printed from left to right. I tried with drawRightString
but nothing does appears on the PDF.
I used openerp-rtl
module but I noticed no changes.
What can i do to print it in RTL mode.
Asked
Active
Viewed 909 times
0

Kenly
- 24,317
- 7
- 44
- 60
1 Answers
1
Generally people working on Right to left text on Arbic Language.
so in this case you just install the below python-bidi package :
https://pypi.python.org/pypi/python-bidi/
python-bidi package is helpful to set the Pure python implementation of the BiDi layout algorithm.
And also add the bidi directory in your OpenERP report dir and use the get_display(string)
method for making your sting convert into the arbic formate and also use with the arabic_reshaper
class
You can do some thing like
import arabic_reshaper
from bidi.algorithm import get_display
def get_arabic_string(string):
reshaped_text = arabic_reshaper.reshape(string)
bidi_text = get_display(reshaped_text)
return bidi_text
Just need to use the get_arbic_string function in your rml file and set it on rml and pass the sting as arbic formate.
just check another source :
pyfribidi for windows or any other bidi algorithm

Community
- 1
- 1

DASADIYA CHAITANYA
- 2,850
- 3
- 18
- 41