Reading data from a PDF file using Java

Reading data from a PDF file using Java

Page 1 of 1

5 Replies - 31549 Views - Last Post: 25 February 2008 - 12:08 AM Rate Topic: -----

#1 Azreal  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 1
  • Joined: 29-March 07

Reading data from a PDF file using Java

Posted 29 March 2007 - 05:50 AM

Hello,

I want to make a script to read specfic pages of an PDF file so i can use this in my webpage.

The problem is that I can't figure out how it's done

thnanks for the support
Is This A Good Question/Topic? 1

Replies To: Reading data from a PDF file using Java

#2 keems21  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 6
  • View blog
  • Posts: 185
  • Joined: 03-February 07

Re: Reading data from a PDF file using Java

Posted 29 March 2007 - 08:39 AM

View PostAzreal, on 29 Mar, 2007 - 05:50 AM, said:

Hello,

I want to make a script to read specfic pages of an PDF file so i can use this in my webpage.

The problem is that I can't figure out how it's done

thnanks for the support


Have you tried using a reader to see if you can read the data from the pdf?

BufferedReader br = new BufferedReader(new FileReader("fileName.pdf"));



I honestly have no idea if that will work. I've never tried it with a pdf. When I get back onto my computer, I'll let you know if I get it to work.

Edit:
alas my computer is dead. Not too much programming is going to be happening for a while. :(

Another edit:
if you want, you could just copy and paste the text of the pdf into a txt file then read from that.

This post has been edited by keems21: 30 March 2007 - 09:51 AM

Was This Post Helpful? 0
  • +
  • -

#3 neotrumatrix  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 49
  • Joined: 06-October 05

Re: Reading data from a PDF file using Java

Posted 23 February 2008 - 06:15 AM

Doesn't work ... the filereader doesn't recognise the text in pdf :( how to parse the text from a pdf to the program ?? Any help please ...
Was This Post Helpful? 0
  • +
  • -

#4 letthecolorsrumble  Icon User is offline

  • Student of The Sun
  • member icon

Reputation: 27
  • View blog
  • Posts: 555
  • Joined: 07-November 07

Re: Reading data from a PDF file using Java

Posted 23 February 2008 - 06:46 AM

There is a free Java-PDF library called iText.

You can find it here

I don't know if it is for reading from a file or just writing to a pdf.

You will need to check out the documentation for that. :)

*Edit : It does read and parse PDF files ..good for you. :)

This post has been edited by letthecolorsrumble: 23 February 2008 - 06:59 AM

Was This Post Helpful? 2

#5 bhandari  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 9
  • View blog
  • Posts: 754
  • Joined: 31-January 08

Re: Reading data from a PDF file using Java

Posted 24 February 2008 - 08:28 AM

yeah, iText is a good library for using PDF files in java.
Other day someone also asking about it and i recommended this only.
Was This Post Helpful? 0
  • +
  • -

#6 neotrumatrix  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 49
  • Joined: 06-October 05

Re: Reading data from a PDF file using Java

Posted 25 February 2008 - 12:08 AM

View Postletthecolorsrumble, on 23 Feb, 2008 - 06:46 AM, said:

There is a free Java-PDF library called iText.

You can find it here

I don't know if it is for reading from a file or just writing to a pdf.

You will need to check out the documentation for that. :)

*Edit : It does read and parse PDF files ..good for you. :)

Thanks a lot ... will try it out ... my project needed it ... can you comment on the large scale reading of pdf's using this ?i mean say thousands of pdf's
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1