title: How to get the direction of text from PDF using PDFBox API
body: <p>I have PDF files which has text in four different orientations like horizontal aligned ,vertically aligned and inversely aligned. While using PDFBox API to read the text from pdf, I am getting good output for horizontally aligned text but not in other cases.
  For example if "italic" word is horizontally aligned , the output is "italic". If it is vertically aligned, then the output is splitting across the lines as
  "it 
   a<br>
   li 
   c"(here "it", "a","li","c" are in different lines).
  I want to know whether there are any ways to get good outptut even for vertically and inversely aligned text.</p>