title: How to search in a pdf file by font size or keep apart footer while searching?
body: <p>I am working on a project that I have to search some text in some pdf files. Those pdf files' pages have footer parts. In footers, text font size is different than main content. I'm using iTextSharp's PdfReader class and I don't want it to search the text I give in footer parts. I think the solution must be either to search by font size, or ignore footers. Any idea?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>private List&lt;int&gt; ReadPdfFile(string fileName, String searchText, int index)
      {
          List&lt;int&gt; pages = new List&lt;int&gt;();
          if (File.Exists(fileName))
          {
              for (int page = 1; page &lt;= pdfReaders[index].NumberOfPages; page++)
              {
                  ITextExtractionStrategy strategy = new SimpleTextExtractionStrategy();
                  string currentPageText = PdfTextExtractor.GetTextFromPage(pdfReaders[index], page, strategy);
                  if (currentPageText.Contains(searchText))
                  {
                      pages.Add(page);
                  }
              }
          }
          return pages;
      }
  </code></pre>