title: I need to extract data from specific part from a given PDF and need to store those extracted parts in MySQL data base table,
body: <p>I need to extract data from specific part from a given PDF and need to store those extracted parts in MySQL data base table, I have written function, to read coordinates of location in given pdf, but in my function, it overrides previous content and will return, last value.</p>
  <p>Any way to get values without overriding it?</p>
  <p>using (var reader = new PdfReader(@&quot;D:\DMS@#\A\ABC.pdf&quot;))
  {</p>
  <pre><code>            var parser = new PdfReaderContentParser(reader);
  
              var strategy = parser.ProcessContent(1, new LocationTextExtractionStrategyWithPosition());
  
              var res = strategy.GetLocations();
  
              reader.Close();
              List&lt;string&gt; oPDFDATA = new List&lt;string&gt;();
              
              
              PDFDATA oPDFDATADTO = new PDFDATA();
  </code></pre>
  <p>it should shows &quot;oPDFDATADTO&quot; in , like
  name:-name;
  Age:- age;
  city:-cityt</p>
  <pre><code>            //var searchResult = res.Where(p =&gt; p.Text.Contains(&quot;name&quot;)).OrderBy(p =&gt; p.Y).Reverse().ToList();
              //oPDFDATA&lt;name&gt;= searchResult.ToString();
  
              oPDFDATADTO.Name = res.Where(p =&gt; p.Text.Contains(&quot;Name&quot;)).OrderBy(p =&gt; p.Y).Reverse().Select(x =&gt; x.Text).ToString();
              oPDFDATADTO.Age = res.Where(p =&gt; p.Text.Contains(&quot;Age&quot;)).OrderBy(p =&gt; p.Y).Reverse().Select(x =&gt; x.Text).ToString();
              oPDFDATADTO.City = res.Where(p =&gt; p.Text.Contains(&quot;City&quot;)).OrderBy(p =&gt; p.Y).Reverse().Select(x =&gt; x.Text).ToString();
              oPDFDATA.Add(oPDFDATADTO.ToString());
  
              oPDFDATADTO.Name = oPDFDATA[0];
              oPDFDATADTO.Age = oPDFDATA[0];
              oPDFDATADTO.City = oPDFDATA[0];
  </code></pre>