title: Writing Arabic with PDFBOX with correct characters presentation form without being separated
body: <p>I'm trying to generate a PDF that contains Arabic text using PDFBox Apache but the text is generated as separated characters because Apache parses given Arabic string to a sequence of general 'official' Unicode characters that is equivalent to the isolated form of Arabic characters.</p>
  
  <p>Here is an example:<br>
  Target text to Write in PDF "Should be expected output in PDF File" -> جملة بالعربي<br>
  What I get in PDF File -> </p>
  
  <p><a href="https://i.stack.imgur.com/bY4dV.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/bY4dV.jpg" alt="incorrect text"></a>  </p>
  
  <p>I tried some methods but it's no use here are some of them:<br>
  1. Converting String to Stream of bits and trying to extract right values<br>
  2. Treating String a sequence of bytes with UTF-8 &amp;&amp; UTF-16 and extracting values from them</p>
  
  <p>There is some approach seems very promising to get the value "Unicode" of each character But it generate general "official Unicode" Here is what I mean</p>
  
  <pre><code>System.out.println( Integer.toHexString( (int)(new String("كلمة").charAt(1))) );  
  </code></pre>
  
  <p><strong>output is 644 but fee0 was the expected output because this character is in middle from then I should get the middle Unicode fee0</strong></p>
  
  <p>so what I want is some method that generates the correct Unicode not the just the official one</p>
  
  <p>The very Left column in the first table in the following link represents the general Unicode<br>
  <a href="https://en.wikipedia.org/wiki/Arabic_script_in_Unicode" rel="noreferrer">Arabic Unicode Tables Wikipedia</a></p>