This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes  Conversion  of Pdf Data to  Text Data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark " Conversion  of Pdf Data to  Text Data" Watch " Conversion  of Pdf Data to  Text Data" New topic
Author

Conversion of Pdf Data to Text Data

Abdul Gafoor
Greenhorn

Joined: Nov 22, 2005
Posts: 11
Hello Friends,
I want to read pdf file .then selected data to write in a text file.
Actually I am using this way
PDDocument doc = PDDocument.load(ff.pdf);
if(doc != null && !doc.isEncrypted())
{
PDFTextStripper textStripper = new PDFTextStripper();
textStripper.setSortByPosition(true);

String str = textStripper.getText(doc);
}
But it is giving correct Output in windows, but if i am deploying in unix.
It will give core java dump file and server is shutting down.
Please give me any idea about that.
Thanks in advance.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14193
    
  20

I just Googled for "PDDocument" and found it here: http://www.pdfbox.org/
So you are probably using that PDF library.

Have a look at that website, there are also forums there, it's probably a good idea to ask your question there.

- Which operating system are you running on? (not just "Unix" please, but: "IBM AIX version...", "HP-UX version ...")
- Which version of which JVM are you using (Sun, IBM, HP, GNU, ...?)
- Which app server software are you using?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Abdul Gafoor
Greenhorn

Joined: Nov 22, 2005
Posts: 11
Thanks Jesper,
Actually We are using IBM UNIX, Tomcat 5.5, JDk 1.5 and PDFBox 7.2
Still I have not got solution for this.
Please give me a solution for this.
Thanks in advance.
 
GeeCON Prague 2014
 
subject: Conversion of Pdf Data to Text Data