If you think that the document template functionality should be improved, you might want to upvote this idea:
https://forum.mendix.com/link/ideas/1097
Don't know a easy way to do this, the document template functionality is limited.
There are some forum post about rotating the text in the template but thats different from your request:
https://forum.mendix.com/link/questions/7898
and
https://forum.mendix.com/link/questions/10382
Maybe file a ticket with Mendix support, right to left languages are supported.