Android: Exception usin iText -


i trying read pdf using itext. below code snippet getting exception "not found file or resource":

public void readfrompdf(){         string content ="";         pdfreader reader = null;         try {             //string filename string path .pdf file, 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;         (int page = 1; page < numberofpages; page++){             try {                 string content1page = pdftextextractor.gettextfrompage(reader, page);                 content = content + content1page;             } catch (ioexception e) {                 // todo auto-generated catch block                 e.printstacktrace();             }         } 

could please figure out whats going wrong?

i had same problem - nobody gave me answer & prof didn't find bug.. soo.. i'm using pdfbox apache http://pdfbox.apache.org it's quite simple read pdfs.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -