This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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: 14114
    
  16

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 7 API documentation
Scala Notes - My blog about Scala
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Conversion of Pdf Data to Text Data