title: Extract text by line from PDF using iTextSharp c#
body: <p>I need to run some analysis my extracting data from a PDF document.</p>
  
  <p>Using <code>iTextSharp</code>, I used the <code>PdfTextExtractor.GetTextFromPage</code> method to extract contents from a PDF document and it returned me in a single long line. </p>
  
  <p>Is there a way to get the text by line so that i can store them in an array? So that i can analyze the data by line which will be more flexible.</p>
  
  <p>Below is the code I used:</p>
  
  <pre><code>       string urlFileName1 = "pdf_link";
          PdfReader reader = new PdfReader(urlFileName1);
          string text = string.Empty;
          for (int page = 1; page &lt;= reader.NumberOfPages; page++)
          {
              text += PdfTextExtractor.GetTextFromPage(reader, page);
          }
          reader.Close();
          candidate3.Text = text.ToString();
  </code></pre>