954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to read .pdf file..?

Hi All

I have one .pdf file and I want to read with this file using PHP. and I know that i need pdf library for do that but i haven't any information about that so, please give me detail info for that library also...!


Thanks in advance.

kuldeep04
Newbie Poster
9 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

Hi Kuldeep,
I had researched this a while ago and Adobe did not have any public apis to work with a pdf document. I still doubt if they have exposed any apis.

ratri
Newbie Poster
21 posts since Jul 2008
Reputation Points: 10
Solved Threads: 1
 

Hi Ratri,

Thanks for reply. can u tell me any other option for reading the PDF file.actully i want to fetch some data from PDF and right in to my Database so How can i do this?

and Thanks again for Reply....

kuldeep04
Newbie Poster
9 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

The way I did it was creating a desktop application with an IE control; load the PDF, programmatically right click on the document and copy. Then parse the copied contents using regular expressions. However, there is room for a lot of mistakes in this approach. Also, the author of the PDF can set the text in the document not selectable. In such scenario, this approach will not work.

One more alternative is to grab a snapshot of the document and parse the bitmap to detect the text in the bitmap. This again is a tedious job .... out of my radar :)

ratri
Newbie Poster
21 posts since Jul 2008
Reputation Points: 10
Solved Threads: 1
 

Hi Ratri,

Thanks for the answer but i would like to inform you that i m making the Web application so i couldn't use desktop application so plz reply me that which i can use with web application.


Thanks again...!

kuldeep04
Newbie Poster
9 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

Hi Kuldeep,
At this point, there is not much that can be done unless Adobe exposes some some PDF api; which at this point they are not.

ratri
Newbie Poster
21 posts since Jul 2008
Reputation Points: 10
Solved Threads: 1
 

I'm reading that the way to go on this is PDFlib-PDI, I cannot give you any examples as I have only worked with pdflib, not pdi.

R0bb0b
Posting Shark
998 posts since Jun 2008
Reputation Points: 358
Solved Threads: 89
 

Is it really possible ? :S

nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
 

Looks like there are examples.

R0bb0b
Posting Shark
998 posts since Jun 2008
Reputation Points: 358
Solved Threads: 89
 
R0bb0b
Posting Shark
998 posts since Jun 2008
Reputation Points: 358
Solved Threads: 89
 

Hmm.. a little complicated..

nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
 

Ya, and it looks like the functionality is extremely limited.

R0bb0b
Posting Shark
998 posts since Jun 2008
Reputation Points: 358
Solved Threads: 89
 

still no any proper answer i found wd the reasurch of 3 days....
but to write pdf we can use tcpdf which writes pdf from html to pdf and for html we can use ckeditor.

sdjewani
Newbie Poster
3 posts since Sep 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You