Results 1 to 1 of 1
Thread: problem read pdf file..
- 10-02-2010, 01:06 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 1
- Rep Power
- 0
problem read pdf file..
Hi,
I have a problem in how to read pdf file where some of certain word from pdf file will insert to database.
For reading pdf file i used pdfbox and displayed as the same as in pdf file by using this code:
I stuck until that code..could please anyone give me some idea in what to do after that or am i need to make another .txt file so that content can be read and insert to database...:(XML Code:File file = new File("C:/DocumentandSettings/user/Desktop/file.pdf"); FileInputStream fis=new FileInputStream(file); BufferedInputStream br=new BufferedInputStream(fis); PDFParser parser = new PDFParser(br); parser.parse(); COSDocument cosDoc =new COSDocument(); cosDoc = parser.getDocument(); PDDocument pdDoc =new PDDocument(cosDoc); PDFTextStripper pdfStripper = new PDFTextStripper(); String parsedText = pdfStripper.getText(pdDoc); System.out.println(parsedText); cosDoc.close();
Similar Threads
-
Problem with JXL: unable to read GSEA xls file
By angeloulivieri in forum Advanced JavaReplies: 3Last Post: 05-10-2010, 12:53 PM -
Read file from directory, update contents of the each file
By svpriyan in forum New To JavaReplies: 2Last Post: 05-11-2009, 10:07 AM -
how to read openproj(Projity) file i.e. ,POD file(Project Management file)
By mahendra.athneria in forum New To JavaReplies: 0Last Post: 02-11-2009, 09:53 AM -
How to read and write to a file without taking out the comments in the file
By MAGNUM in forum New To JavaReplies: 5Last Post: 02-05-2009, 10:28 AM -
How to read a text file from a Java Archive File
By Java Tip in forum Java TipReplies: 0Last Post: 02-08-2008, 09:13 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks