I have gone through w3 school website and found that there is attribute "writing-mode"
that we can use with
<fo:simple-page-master>,<fo:region-*> ,<fo:table>
.
When I use it with <fo:table writing-mode="rl-tb">
text directions and writing mode works properly but when use it with other tags , it doesn't work.
so please suggest me "is there any way to make a single change on xsl and entire writing mode and direction will change?".

- 5,710
- 10
- 44
- 89

- 1,285
- 6
- 20
- 47
2 Answers
Directly from apache-fop doc
The writing-mode property is inherited, so it can appear on any XSL-FO element type; however, it applies (semantically) only to the following element types:
fo:page-sequence
fo:simple-page-master
fo:region-*
fo:block-container
fo:inline-container
fo:table
So technically, no there isn't anyway way...
BUT Apache FOP is open source project so you could easily add a method that render from right to left.
Also, If the goal is to write arabic language, note that if you output to RTF instead of PDF, it will automatically be correctly displayed.

- 20,626
- 7
- 49
- 76
There's no way to make a single change. The most straightforward way to change the writing mode is to specify it on each fo:page-sequence. This gives the lowest number of changes to your XSL-FO.
In addition to the text flow change, you may have to change some of the simple-page-masters to get a layout that works with a right-to-left direction.
(note: don't specify the writing mode on the page-sequence-master, I just spent a long time finding out that that doesn't work)

- 1,964
- 3
- 18
- 35