title: Android: Exception usin iText
body: <p>I am trying to read pdf using iText. Below is the code snippet for which i am getting exception as "not found as a file or resource":</p>
  
  <pre><code>public void readFromPdf(){
          String content ="";
          PdfReader reader = null;
          try {
              //String fileName is the string with the path to your .pdf file, for example resources/pdfs/preface.pdf
              reader = new PdfReader("C:\\test\\demo.pdf");
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          int numberOfPages = reader.getNumberOfPages();
          numberOfPages = numberOfPages + 1;
          for (int page = 1; page &lt; numberOfPages; page++){
              try {
                  String content1Page = PdfTextExtractor.getTextFromPage(reader, page);
                  content = content + content1Page;
              } catch (IOException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
          }
  </code></pre>
  
  <p>Could anyone please figure out whats going wrong?</p>