for i in t.split('\n'):
arabic_string = arabic_reshaper.reshape(i)
arabic_string = arabic_string[::-1]
w = pdf.get_string_width(arabic_string) + 6
pdf.cell(w, 9, arabic_string, 0, 1, 'C', 0)
the problem is that numpers in the var t is flipt too like 48 -> 84 I need a soloution pls
You can avoid this issue by splitting the string into words, checking if each word is numeric, and reversing only non-numeric parts