title: know count of chars in TJ operand , know where you have to split (delimiter characters or white space characters contains) TJ line in pdf?
body: <p>I read &quot;7.2 Lexical conventions&quot;  from adobe 1.7 documentation. Still didn't clear that how count number of chars in a Tj Operand. I am confused when applying this like code in PDFBox.</p>
  <p>page -1</p>
  <p><a href="https://i.stack.imgur.com/qNee5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qNee5.png" alt="enter image description here" /></a></p>
  <p>Related content stream</p>
  <p><a href="https://i.stack.imgur.com/1kh6C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1kh6C.png" alt="enter image description here" /></a></p>
  <p>Page -2</p>
  <p><a href="https://i.stack.imgur.com/FoUaM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FoUaM.png" alt="enter image description here" /></a>
  Related content stream</p>
  <p><a href="https://i.stack.imgur.com/ED9zA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ED9zA.png" alt="enter image description here" /></a></p>
  <p>In above use cases I don't know which kind of char sets they used. I dont know how to count letters by seeing them. And don't know by using PDFBox in page2 the highlighted line till &quot;In f&quot; I need to locate in content stream.</p>
  <p>When I parsed using PDFBox the highlighted TJ line in page2 is giving like</p>
  <p><a href="https://i.stack.imgur.com/N9e7F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N9e7F.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/N1CIt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N1CIt.png" alt="enter image description here" /></a></p>
  <p>If you see in 2nd index the number of bytes were 6 but in content stream able to see only 4 like below.</p>
  <p><a href="https://i.stack.imgur.com/PY4mI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PY4mI.png" alt="enter image description here" /></a></p>
  <p>What is the correct way of counting and locating positions. I want to split after 'n' char in second page . How to do that?</p>
  <p>I want to split code at index 4.</p>
  <pre><code>private static List&lt;Object&gt; splitTJ(inst knum, ind TJ_ind, COSArray tj_array)
  {
  splitedstr = new COSString( ((COSString)tj_array.get(TJ_ind)).getString().substring(0, knum));
  splitedstr2 = new COSString(((COSString)tj_array.get(TJ_ind)).getString().substring(knum, ((COSString)tj_array.get(TJ_ind)).getString().length()));
  // This below method  will take care of creating new positioning operator along with Tj or TJ.
  CreateNewTj(splitedstr);
  CreateNewTj(splitedstr2);
  }
  </code></pre>
  <p>In above code based on knum index if I splited string bytes its messing up everything because of wrong place split. How can I split preoperly at 4th index?</p>