title: How to parse untagged pdf file with iText
body: <p>I want to parse this file (<a href="http://www.bbm.ca/_documents/top_30_tv_programs_english/2011/nat01032011.pdf" rel="nofollow">http://www.bbm.ca/_documents/top_30_tv_programs_english/2011/nat01032011.pdf</a>) with iText. The problem is it is not tagged so I can't get the XML file. I decided to extract the text from it and I thought that for example the first line will be like :</p>
  
  <pre><code>1\specialCharWJC:PLAYOFFS CANADA\specialCharTSN+\specialCharM.W....\specialChar19:30\specialChar21:57\specialChar5133
  </code></pre>
  
  <p>The text I extracted for the first line is </p>
  
  <pre><code>1 WJC:PLAYOFFS CANADA TSN+ M.W.... 19:30 21:57 5133
  </code></pre>
  
  <p>I extracted the text using :</p>
  
  <pre><code>PdfReader reader = new PdfReader(filename);
  String str = PdfTextExtractor.getTextFromPage(reader, 1);
  </code></pre>
  
  <p>How the PDf viewer know that CANADA is in the second column not in the third.</p>
  
  <p>My current solution is to convert the pdf file to html5 using <a href="http://www.idrsolutions.com/online-pdf-to-html5-converter/" rel="nofollow">http://www.idrsolutions.com/online-pdf-to-html5-converter/</a> who can determine the text for each column. </p>
  
  <p>Thanks for your response </p>