title: Getting Coordinates of string using ITextExtractionStrategy and LocationTextExtractionStrategy in Itextsharp
body: <p>I have a PDF file that i am reading into string using ITextExtractionStrategy.Now from the string i am taking a substring like <code>My name is XYZ</code> and need to get the rectangular coordinates of  substring from the PDF file but not able to do it.On googling i got to know that <code>LocationTextExtractionStrategy</code> but not getting how to use this to get the coordinates.</p>
  
  <p>Here is the code..</p>
  
  <pre><code>ITextExtractionStrategy strategy = new SimpleTextExtractionStrategy();
  string currentText = PdfTextExtractor.GetTextFromPage(pdfReader, page, strategy);
  currentText = Encoding.UTF8.GetString(ASCIIEncoding.Convert(Encoding.Default, Encoding.UTF8, Encoding.Default.GetBytes(currentText)));
  text.Append(currentText);
  
  string getcoordinate="My name is XYZ";
  </code></pre>
  
  <p>How can i get the rectangular coordinate of this substring using ITEXTSHARP..</p>
  
  <p>Please help.</p>