Hi Rahul,
What XSL-FO to PDF formatter are you using? If an English text (or phase/word) exists in Arabic text, it should be automatically formatted left to right according to the Unicode BIDI algorithm because English text has the own Latin script attribute. Refer to XSL specification for details:
7.29.7 "writing-mode"
https://www.w3.org/TR/xsl11/#writing-mode
> rl-tb
>If any left-to-right reading characters or numbers are present in the text, the inline-progression-direction for glyph-areas may be further modified by the Unicode BIDI algorithm.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"><concept id="concept_txq_pbq_wz" xml:lang="ar"> <title>Arabic & English text test</title> <conbody> <p>The quick brown fox jumps over the lazy dog </p> <p>الثعلب البني السريع يقفز فوق الكلب الكسول </p> <p>الثعل the lazy dog ب البنيfox jumps over السري عquick brown يقفز فوق The الكلب الكسول </p> </conbody></concept>Hi Rahul,
I copied your two paragraphs and generated PDF via DITA-OT 2.4.6 & AH Formatter V6.4.
As you can see GBPS and other English texts are rendered correctly. I guess that your Hebrew topic is translated from English topic. Usually a translator inserts Unicode BIDI control characters to get the right direction result if the Unicode bidirectional algorithm is not sufficient. These codes includes:
U+202A LEFT-TO-RIGHT EMBEDDING (LRE)
U+202B RIGHT-TO-LEFT EMBEDDING (RLE)
U+202C POP DIRECTIONAL FORMATTING (PDF)
U+202D LEFT-TO-RIGHT OVERRIDE (LRO)
U+202E RIGHT-TO-LEFT OVERRIDE (RLE)
These codes directly affects text direction. So if a translator missed inserting these codes, we got unexpected text direction result. Could you consult your Hebrew topic whether it contains these characters?
U+202A LEFT-TO-RIGHT EMBEDDING (LRE)
U+202B RIGHT-TO-LEFT EMBEDDING (RLE)
U+202C POP DIRECTIONAL FORMATTING (PDF)
U+202D LEFT-TO-RIGHT OVERRIDE (LRO)
U+202E RIGHT-TO-LEFT OVERRIDE (RLE)