janim Posted March 12, 2009 Share Posted March 12, 2009 Hi All, any one have an idea how to read PDF files using php let's say i'll upload pdf file, then i need to see what text inside this file, and search it ... etc thanks for any suggestion ! Quote Link to comment Share on other sites More sharing options...
premiso Posted March 12, 2009 Share Posted March 12, 2009 If the pdf is unencrypted and not an image, you should be able to read it like a normal text file. If it is an image, you need to use OCR technology to read it. Quote Link to comment Share on other sites More sharing options...
Psycho Posted March 12, 2009 Share Posted March 12, 2009 I'll have to disagree with you permiso. Strictly speaking you can read the PDF file contents, but it will consist of human unreadable code. Such as this: ©?}!&ŠÞáQS—×=K$ÀpF½ÁñξaG_Äßý#ÎþQ{ÿCÄî‹8û¢®txÇ ½ÑNoÔåqÑ There's no strait-forward way to read the displayed words in a PFD file. You would probably want to get a 3rd party application that you can run on the server (assuming you have the rights to do so) which PHP can utilize. Here is one possibility where a person stated that you could use it to get the text from a PFD without any formatting: xpdf: http://www.foolabs.com/xpdf/ Or PDFTOTEXT: http://www.pdf2text.com/ConvertPDFToText-server-edition.htm Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.